/*/////////////////////////////////////////////////////////////////////////////
/
/
/////////////////////////////////////////////////////////////////////////////*/
#ifndef ARMORS_H
#define ARMORS_H

#ifdef WIN32
#pragma once
#endif

#include "items.h"


const enum
{
	body=0, helm, greaves, boots, shoulders, leggings, belt, ring, charm, cape 
} CARMORTYPE;

const enum
{
	Aequip=0, Aunequip, Asell, Abuy, Ause_magic, block /* only shield */
} CARMORACTION;

class cArmor : public cItem
{
private:
	// mType 0 is body, 1 is helm, 2 is greaves, 3 is boots, 4 is shoulders, 5 is leggings, 6 is belt, 7 is ring, 8 is charm, 9 is cape
	int mAC;
	int mProtection;
	int mMagicModifier;
	bool isMagic;
	string mMagicName;
	string mMagicDescription;
public:
	cArmor();
	cArmor(string name, string desc, int type, int value, int ac, int prot, bool magic, bool twoh, bool heavy, bool sell);
	~cArmor();
	virtual bool Use(string sAction);

	// Accessors
	const int getAC() { return mAC; }
	const int getProtection() { return mProtection; }
	const bool getMagic() { return isMagic; }
	const string getMagicDesc() { return mMagicDescription; }
	const int getMagicMod() { return mMagicModifier; }
	const string getMagicName() { return mMagicName; }

	void setAC( int tmp ) { if( tmp > 8 ) mAC = tmp; }
	void setProtection( int tmp ) { if( tmp > 0 ) mProtection = tmp; }
	void setMagic( bool tmp ) { isMagic = tmp; }
	void setMagicDesc( string tmp ) { mMagicDescription = tmp; }
	void setMagicMod( int tmp ) { mMagicModifier = tmp; }
	void setMagicName( string tmp ) { mMagicName = tmp; }
};


#endif